import { RouteRecordRaw, RouterView } from 'vue-router'

import { redirectPath } from '../help'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/sys-log',
    component: RouterView,
    meta: { title: '系统日志', auth: ['sys-log-login', 'sys-log-handle'] },
    redirect: redirectPath,
    children: [
      {
        path: '/sys-log/login-log',
        meta: { title: '登录日志', auth: ['sys-log-login'] },
        component: () => import('@/views/admin/sys-log/login-log/index.vue'),
        children: []
      },
      {
        path: '/sys-log/handle-log',
        meta: { title: '操作日志', auth: ['sys-log-handle'] },
        component: () => import('@/views/admin/sys-log/handle-log/index.vue')
      }
    ]
  }
]

export default routes
